package org.micode.demo.biz.service.impl;

import org.micode.demo.biz.service.BizLog4jService;
import org.micode.common.helper.LoggerHelper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class BizLog4jServiceImpl implements BizLog4jService {

    @Override
    public Boolean resetLogLevel(String loggerName, String levelName, String clientIp) {
        if ("127.0.0.1".equals(clientIp)) {
            return LoggerHelper.resetLogLevel(loggerName, levelName);
        }
        return false;
    }

}
